import CheckListPage from "../page/CheckList";
import EditTableProPage from "../page/EditTableProPage";
import DynamicFormPage from "../page/DynamicForm";
import ManageMemuberPage from "../page/ManageMemuber";
import SettimeoutPage from "../page/Settimeout";
import DiyModalPage from "../page/DiyModal";
import ComparePropsPage from "../page/CompareProps";
import TestPage from "../page/TestPage";
import LayoutPage from "../page/LayoutPage";
import JsonScheme from "../page/reactJsonSchemeForm";
import G6TreePage from "../page/antdVG6";
// function WithRouter({ children }) {
//   const token = sessionStorage.getItem("token");
//   if (token) {
//     return <>{children} </>;
//   } else {
//     return (
//       <Navigate to="/loginPage" replace>
//         {" "}
//       </Navigate>
//     );
//   }
// }
const routes = [
  {
    path: "/",
    element: <LayoutPage />,
    children: [
      { path: "/checkListPage", element: <CheckListPage /> },
      { path: "/proTablePage", element: <EditTableProPage /> },

      { path: "/dynamicForm", element: <DynamicFormPage /> },
      { path: "/diyModal", element: <DiyModalPage /> },
      { path: "/manageMemuber", element: <ManageMemuberPage /> },
      { path: "/settimeout", element: <SettimeoutPage /> },
      { path: "/compareProps", element: <ComparePropsPage /> },
      { path: "/jsonScheme", element: <JsonScheme /> },
      { path: "/g6Tree", element: <G6TreePage /> },
      { path: "/test", element: <TestPage /> },
    ],
  },
];
export default routes;
